<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <title>预警配置</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
        border: none;
    }
    .form-control{
        display: inline-block;
        width: 80%;
    }
    .radio{
        margin-top: 0;
    }
    .bottomBoxHeight{
        margin-top: 47px;
    }
    .tdStyle{
        height: 80px!important;
    }
    .tdStyle1{
        height: 80px;
        line-height: 110px;
    }
    .tdStyle12{
        height: 85px;
    }
    </style>

    <asset:stylesheet src="homer/vendor/ladda-themeless.min.css"/>
    <asset:javascript src="echarts/Chart.min.js"/>
    <asset:javascript src="homer/vendor/index.js"/>
    <asset:javascript src="homer/vendor/spin.min.js"/>
    <asset:javascript src="homer/vendor/ladda.min.js"/>
    <asset:javascript src="homer/vendor/ladda.jquery.min.js"/>
    <asset:javascript src="echarts/echarts-all-3.js" />
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>配置</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                预警配置
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">

    %{--押品价值波动风险配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品价值波动风险配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">
                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">预警维度：</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form11">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 价值上升波动范围：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong3"  type="text" name="valueRiseWeight" id="valueRiseWeight" value="<g:formatNumber number="${result.valueRiseWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值10">
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td> 价值下降波动范围：</td>
                                        <td>

                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong3" type="text" name="valueDeclineWeight" id="valueDeclineWeight" value="<g:formatNumber number="${result.valueDeclineWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值10">
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button btn btn-success" id="sub11" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault11" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1">
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                    <tr>
                                        <th class="sortable"><h3 class="text-success">周期设定：</h3></th>
                                    </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="week">周末</option>
                                            <option value="month">月末</option>
                                            <option value="quarter">季末</option>
                                            <option value="year">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--逾期/违约（对公/个人）配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                逾期/违约（对公/个人）配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">预警维度：</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form12">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 个人逾期次数：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong1"  type="text" name="contactOverdueWeight" id="contactOverdueWeight" value="<g:formatNumber number="${result.contactOverdueWeight}"  type="number" minFractionDigits="0" maxFractionDigits="0" />" placeholder="默认值6">
                                                <span class="input-group-addon">次</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td> 个人违约次数：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong1"
                                                       type="text" name="contactBreachWeight" id="contactBreachWeight"
                                                       value="<g:formatNumber number="${result.contactBreachWeight}"  type="number" minFractionDigits="0" maxFractionDigits="0" />" placeholder="默认值2">
                                                <span class="input-group-addon">次</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td> 企业逾期次数：</td>
                                        <td>

                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong1" type="text" name="accountOverdueWeight"
                                                       id="accountOverdueWeight" value="<g:formatNumber number="${result.accountOverdueWeight}" type="number" minFractionDigits="0" maxFractionDigits="0" />" placeholder="默认值6">
                                                <span class="input-group-addon">次</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td> 企业违约次数：</td>
                                        <td>

                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong1" type="text" name="accountBreachWeight"
                                                       id="accountBreachWeight" value="<g:formatNumber number="${result.accountBreachWeight}"
                                                                                                       type="number" minFractionDigits="0" maxFractionDigits="0" />" placeholder="默认值2">
                                                <span class="input-group-addon">次</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button btn btn-success" id="sub12" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault12" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1">
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>
                                        更新频次：
                                    </td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>
                                        更新频次：
                                    </td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>
                                        更新频次：
                                    </td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>
                                        更新频次：
                                    </td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--集中度风险配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                集中度风险配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">预警维度：</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form13">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 集中度风险综合评分：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong2"
                                                       type="text"
                                                       name="concentrationRiskWeight"
                                                       id="concentrationRiskWeight" value="<g:formatNumber number="${result.concentrationRiskWeight}" type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值3">
                                                <span class="input-group-addon">分</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub13" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault13" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>触发方式：</td>
                                        <td>
                                            <div class="radio radio-info radio-inline">
                                                <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                            </div>
                                        </td>
                                        <td>更新频次：</td>
                                        <td>
                                            <select>
                                                <option value="">周末</option>
                                                <option value="">月末</option>
                                                <option value="">季末</option>
                                                <option value="">年末</option>
                                            </select>
                                        </td>
                                        <td>
                                            工作流：
                                        </td>
                                        <td>
                                            <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--押品覆盖率风险配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    %{--<g:link action="create" class="btn btn-info btn-xs" data-toggle="modal"--}%
                    %{--data-target="#myModal7"><i class="glyphicon glyphicon-download-alt"></i></g:link>--}%
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品覆盖率风险配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">预警维度：</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form14">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 城市占比覆盖率：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong2"
                                                       type="text" name="coverRateOfCityWeight" id="coverRateOfCityWeight"
                                                       value="<g:formatNumber number="${result.coverRateOfCityWeight*100}"
                                                                              type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值10">
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td> 小区占比覆盖率：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">大于等于</span>
                                                <input class="form-control liutong2" type="text" name="coverRateOfCommunityWeight" id="coverRateOfCommunityWeight" value="<g:formatNumber number="${result.coverRateOfCommunityWeight*100}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值10">
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>

                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub14" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault14" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--舆情预警配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                舆情预警配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >

                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">
                            <h3 class="text-success">舆情预警检索关键词：</h3>
                                <form id="form15">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <input type="hidden" name="publicOpinionsWeight" id="publicOpinionsWeight" value="${result.publicOpinionsWeight}" >
                                    <g:each in="${componentService.evaluate(com.cindata.Component.findByCode('publicOpinionConfig'))?.split(';')}">
                                        <p>
                                            ${it?.split(':')[0]}
                                            <g:if test="${it?.split(':')?.size() > 1}">
                                                <g:each in="${it?.split(':')[1].split(',')}">
                                                    <div style="width: 160px;display: inline-block;">
                                                        <input type="checkbox" class="i-checks publicOpinion" name="publicOpinion" value="${it}">&nbsp;${it}
                                                    </div>
                                                </g:each>
                                            </g:if>
                                        </p>
                                    </g:each>
                                </form>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub15" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault15" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle12">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--押品效期到期配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                押品效期到期配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">
                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">评分维度</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form16">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 到期距离天数：</td>
                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">小于等于</span>
                                                <input class="form-control liutong4"  type="text" name="effectiveDaysWeight" id="effectiveDaysWeight" value="<g:formatNumber number="${result.effectiveDaysWeight}"  type="number" minFractionDigits="0" maxFractionDigits="0" />" placeholder="默认30天">
                                                <span class="input-group-addon">天</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub16" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault16" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1">
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--楼盘评分风险配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                楼盘评分风险配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6">
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">
                            <table cellpadding="1" cellspacing="1" class="table text-left" style="border:none">
                                <thead>
                                <tr>
                                    <th class="sortable"><h3 class="text-success">预警维度：</h3></th>
                                    <th class="sortable"><h3 class="text-success">预警设定：</h3></th>
                                </tr>
                                </thead>
                                <tbody>
                                <form id="form17">
                                    <input type="hidden" name="ltid" value="${result.id}" >
                                    <tr>
                                        <td> 楼盘评分：</td>

                                        <td>
                                            <div class="input-group">
                                                <span class="input-group-addon">小于等于</span>
                                                <input class="form-control liutong4"  type="text" name="buildingRatedWeight" id="buildingRatedWeight" value="<g:formatNumber number="${result.buildingRatedWeight}"  type="number" minFractionDigits="1" maxFractionDigits="1" />" placeholder="默认值3">
                                                <span class="input-group-addon">分</span>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                                </tbody>
                            </table>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub17" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault17" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-5 col-md-offset-1" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td>更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--贷款人预警配置--}%
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                贷款人预警配置
            </div>
            <div class="panel-body ">
                <div class="col-md-6" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">
                            <h3 class="text-success">贷款人风控维度：</h3>
                            <form id="form18">
                                <input type="hidden" name="ltid" value="${result.id}" >
                                <input type="hidden" id="contactCreditWeight" name="contactCreditWeight" value="${result.contactCreditWeight}" >

                                <g:each in="${componentService.evaluate(com.cindata.Component.findByCode('contactWarningConfig'))?.split(';')}">
                                    <div>
                                        <div class="col-md-3 tdStyle1">
                                            <input type="checkbox" class="i-checks contactRisk" name="contactRisk" value="${it?.split(':')[0]}">&nbsp;${it?.split(':')[0]}
                                        </div>

                                        <g:if test="${it?.split(':')?.size() > 1}">
                                            <div class="col-md-9 bottomBoxHeight">
                                                <g:each in="${it?.split(':')[1]?.split(',')}">
                                                    ${it} &nbsp;
                                                </g:each>
                                            </div>
                                        </g:if>
                                    </div>
                                        <div class="clearfix"></div>
                                </g:each>
                            </form>
                            <div class="form-group col-md-offset-4" style="margin-top: 40px;">
                                <button class="ladda-button  btn btn-success " id = "sub18" data-style="expand-right">提交</button>
                                <button class="btn btn-warning" id="ltdefault18" data-style="expand-right" style="margin-left: 10px;">恢复默认值</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6" >
                    <div class="row">
                        <div class="table-responsive" style="overflow-x:inherit">

                            <table cellpadding="1" cellspacing="1" class="table" style="border:none">
                                <thead>
                                <tr>
                                    <td><h3 class="text-success">周期设定：</h3></td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td class="tdStyle">触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>触发方式：</td>
                                    <td>
                                        <div class="radio radio-info radio-inline">
                                            <input type="checkbox" class="i-checks" name="overDue" value="true">&nbsp;自动
                                        </div>
                                    </td>
                                    <td class="tdStyle">更新频次：</td>
                                    <td>
                                        <select>
                                            <option value="">周末</option>
                                            <option value="">月末</option>
                                            <option value="">季末</option>
                                            <option value="">年末</option>
                                        </select>
                                    </td>
                                    <td>
                                        工作流：
                                    </td>
                                    <td>
                                        <g:select class="form-control" name="workflow" id="workflow" from="${com.cindata.Workflow.list()}" optionKey="id" optionValue="name" value="${params?.workflow}" noSelection="${['': '请选择']}"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<g:javascript>

    // 押品价值波动风险配置
    var s11 = $( '#sub11').ladda();
    s11.click(function(){
        var valueRiseWeight = $("#valueRiseWeight").val()
        if (valueRiseWeight <= 0 || valueRiseWeight>= 100)
        {
            toastr.error('请输入正确的价值上升波动范围值！');
            return false;
        }

        var valueDeclineWeight = $("#valueDeclineWeight").val()
        if (valueDeclineWeight <= 0 || valueDeclineWeight>= 100)
        {
            toastr.error('请输入正确的价值下降波动范围值！');
            return false;
        }

        s11.ladda('start');
        var data = $("#form11").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyValue",
            data: data,
            success: function (data) {
                s11.ladda('stop')
                location.href = location.href
            }
        });
    });

    $("#ltdefault11").click(function(){
        $("#valueRiseWeight").val("10.0")
        $("#valueDeclineWeight").val("10.0")

        s11.click()
    })


    // 逾期/违约（对公/个人）配置
    var s12 = $( '#sub12').ladda();
    s12.click(function(){
        
        var contactOverdueWeight = $("#contactOverdueWeight").val()
        var contactBreachWeight = $("#contactBreachWeight").val()
        var accountOverdueWeight = $("#accountOverdueWeight").val()
        var accountBreachWeight = $("#accountBreachWeight").val()
        if (contactOverdueWeight <= 0 || contactBreachWeight <= 0 || accountOverdueWeight <= 0 || accountBreachWeight <= 0)
        {
            toastr.error('请输入正确的次数值！');
            return false;
        }

        s12.ladda('start');
        var data = $("#form12").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyOverDue",
            data: data,
            success: function (data) {
                s12.ladda('stop')
                location.href = location.href
            }
        });
    });

    $("#ltdefault12").click(function(){
        $("#contactOverdueWeight").val("6")
        $("#contactBreachWeight").val("2")
        $("#accountOverdueWeight").val("6")
        $("#accountBreachWeight").val("2")

        s12.click()
    })


    // 集中度风险配置
    var s13 = $( '#sub13').ladda();
    s13.click(function(){
        var concentrationRiskWeight = $("#concentrationRiskWeight").val()
        if (concentrationRiskWeight <= 0 || concentrationRiskWeight >= 100)
        {
            toastr.error('请输入正确的集中度风险值！');
            return false;
        }

        s13.ladda('start');
        var data = $("#form13").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyConcentrationRisk",
            data: data,
            success: function (data) {
                s13.ladda('stop')
                location.href = location.href
            }
        });
    });

    $("#ltdefault13").click(function(){
        $("#concentrationRiskWeight").val("3.0")

        s13.click()
    })


    // 押品覆盖率风险配置
    var s14 = $( '#sub14').ladda();
    s14.click(function(){

        var coverRateOfCityWeight = $("#coverRateOfCityWeight").val()
        if (coverRateOfCityWeight <= 0 || coverRateOfCityWeight >= 100)
        {
            toastr.error('请输入正确的城市占比覆盖率！');
            return false;
        }
        var coverRateOfCommunityWeight = $("#coverRateOfCommunityWeight").val()
        if (coverRateOfCommunityWeight <= 0 || coverRateOfCommunityWeight >= 100)
        {
            toastr.error('请输入正确的小区占比覆盖率！');
            return false;
        }

        s14.ladda('start');
        var data = $("#form14").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyCoverRate",
            data: data,
            success: function (data) {
                s14.ladda('stop')
                location.href = location.href
            }
        });
    });
    $("#ltdefault14").click(function(){
        $("#coverRateOfCityWeight").val("10.0")
        $("#coverRateOfCommunityWeight").val("10.0")

        s14.click()
    })

    // 舆情
    var s15 = $( '#sub15').ladda();
    s15.click(function(){
        var publicOpinion = $("input:checkbox[name='publicOpinion']:checked").map(function(index,elem) {
            return $(elem).val()
        }).get().join(',')

        $("#publicOpinionsWeight").val(publicOpinion)

        s15.ladda('start');
        var data = $("#form15").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyPublicOpinion",
            data: data,
            success: function (data) {
                s15.ladda('stop')
                location.href = location.href
            }
        });
    });

    $("#ltdefault15").click(function(){
        
        $('.publicOpinion').each(function() {
            $(this).prop('checked',false)
        });

        s15.click()
    })


    // 押品效期到期配置
    var s16 = $( '#sub16').ladda();
    s16.click(function(){
        var effectiveDaysWeight = $("#effectiveDaysWeight").val()
        if (effectiveDaysWeight <= 0)
        {
            toastr.error('请输入正确的到期距离天数！');
            return false;
        }

        s16.ladda('start');
        var data = $("#form16").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyEffectiveDays",
            data: data,
            success: function (data) {
                s16.ladda('stop')
                location.href = location.href
            }
        });
    });
    $("#ltdefault16").click(function(){
        $("#effectiveDaysWeight").val("30")

        s16.click()
    })

    // 楼盘评分风险配置
    var s17 = $( '#sub17').ladda();
    s17.click(function(){
        var buildingRatedWeight = $("#buildingRatedWeight").val()
        if (buildingRatedWeight <= 0 || buildingRatedWeight >= 100)
        {
            toastr.error('请输入正确的楼盘评分值！');
            return false;
        }

        s17.ladda('start');
        var data = $("#form17").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyBuildingRated",
            data: data,
            success: function (data) {
                s17.ladda('stop')
                location.href = location.href
            }
        });
    });
    $("#ltdefault17").click(function(){
        $("#buildingRatedWeight").val("3.0")

        s17.click()
    })

    // 贷款人预警配置
    var s18 = $( '#sub18').ladda();
    s18.click(function(){
        var contactRisk = $("input:checkbox[name='contactRisk']:checked").map(function(index,elem) {
            return $(elem).val()
        }).get().join(',')

        $("#contactCreditWeight").val(contactRisk)

        s18.ladda('start');
        var data = $("#form18").serialize();
        $.ajax({
            type: "post",
            url: "/riskWarningConfigure/modifyContactRisk",
            data: data,
            success: function (data) {
                s18.ladda('stop')
                location.href = location.href
            }
        });
    });

    $("#ltdefault18").click(function(){
        
        $('.contactRisk').each(function() {
            $(this).prop('checked',false)
        });

        s18.click()
    })

    // 渲染借款人预警
    $('.contactRisk').each(function() {
        var contactCreditWeight = $("#contactCreditWeight").val()
        if (contactCreditWeight.indexOf($(this).val()) != -1)
        {
            $(this).prop('checked',true)
        }
    });

    $('.publicOpinion').each(function() {
        var publicOpinionsWeight = $("#publicOpinionsWeight").val()
        if (publicOpinionsWeight.indexOf($(this).val()) != -1)
        {
            $(this).prop('checked',true)
        }
    });

</g:javascript>

</body>
</html>